﻿using System;

namespace CoreEx.Common.Logging
{
    /// <summary>
    /// Represents a logger that is capable of logging messages and exceptions with different severity levels.
    /// </summary>
    public interface ILogger
    {
        /// <summary>
        /// Logs a debug message.
        /// </summary>
        /// <param name="message">The message to log.</param>
        void LogDebug(object message);

        /// <summary>
        /// Logs a debug message.
        /// </summary>
        /// <param name="message">The message to log.</param>
        /// <param name="exception">An <see cref="Exception"/> to be logged with the message.</param>
        void LogDebug(object message, Exception exception);

        /// <summary>
        /// Logs an info message.
        /// </summary>
        /// <param name="message">The message to log.</param>                
        void LogInfo(object message);

        /// <summary>
        /// Logs an info message.
        /// </summary>
        /// <param name="message">The message to log.</param>
        /// <param name="exception">An <see cref="Exception"/> to be logged with the message.</param>
        void LogInfo(object message, Exception exception);

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <param name="message">The message to log.</param>                
        void LogWarning(object message);

        /// <summary>
        /// Logs a warning message.
        /// </summary>
        /// <param name="message">The message to log.</param>
        /// <param name="exception">An <see cref="Exception"/> to be logged with the message.</param>
        void LogWarning(object message, Exception exception);

        /// <summary>
        /// Logs an error message.
        /// </summary>
        /// <param name="message">The message to log.</param>                
        void LogError(object message);

        /// <summary>
        /// Logs an error message.
        /// </summary>
        /// <param name="message">The message to log.</param>
        /// <param name="exception">An <see cref="Exception"/> to be logged with the message.</param>
        void LogError(object message, Exception exception);

        /// <summary>
        /// Logs a fatal message.
        /// </summary>
        /// <param name="message">The message to log.</param>                
        void LogFatal(object message);

        /// <summary>
        /// Logs a fatal message.
        /// </summary>
        /// <param name="message">The message to log.</param>
        /// <param name="exception">An <see cref="Exception"/> to be logged with the message.</param>
        void LogFatal(object message, Exception exception);
    }
}